feat: option for enabling concurrent rendering#1685
Conversation
| const testRendererOptions: TestRendererOptions = { | ||
| ...rest, | ||
| // @ts-expect-error incomplete typing on RTR package | ||
| unstable_isConcurrent: concurrentRoot ?? getConfig().concurrentRoot, |
There was a problem hiding this comment.
Just curious, with RTR being deprecated, do you plan to remove it?
https://github.com/facebook/react/tree/main/packages/react-test-renderer
There was a problem hiding this comment.
@slorber I've got a working prototype for alternative test renderer built using React Reconciler (the package that virtually all alt React renderers use) in #1669. It passes all of RNTL tests and would be a good replacement for RTR. I still need to modify it for React 19 (in #1690). While transition to the new render will happen, there is no immediate urgency to replace RTR, as it still works with React 19, although with deprecation warning (which is btw disabled for RN testing).
My plan is as follows:
- RNTL v13 (alpha version already published) will be based on RTR and support React 18 & 19.
- RNTL v14 will be based on the new renderer and support probably React 19+
|
This PR has been released in v12.8.0 🎉 |
Summary
Add
concurrentRenderingoption to bothrenderandconfigurethat allows enabling concurrent rendering in the underlying React Test Renderer. The option is disabled by default not to break user tests but should be enabled in the next major release.Test plan